/**
 * Created by Administrator on 2017/6/27.
 */


function index(){
    var header = ' <a class="aui-pull-left aui-btn " id="home">\
        <span class="fa fa-user-circle-o fa-lg"></span>\
        </a>\
        <div class="aui-title"><span class="fa fa-map-marker"  ></span>\
        <label style="font-size: 15px;" id="city"></label></div>\
        <a class="aui-pull-right aui-btn" href="../system/messageList.html">\
        <span class="fa fa-comments fa-lg"></span>\
        </a>'
    $("#header").html(header);

    var banner = '<div class="info">\
    <img  class="avatar aui-img-round" id="head-img" onclick="location.href=\'../UserManage/viewInfo.html\'">\
        <h3 class="aui-margin-t-10" id="nickname"></h3>\
        <div class="aui-margin-t-10" style="font-size: 14px;color: #f1a610">\
        信誉分：<span id="creditScore"></span>\
        </div>\
   </div>' +
        '<div class="banner-list">' +
        '<a href="../UserManage/viewOrder.html"><span class="fa fa-list"></span> 我的请求</a>' +
        '<a href="../UserManage/viewBuy.html"><span class="fa fa-list"></span> 我的代购</a>' +
        '<a href="../UserManage/mypurse.html"><span class="fa fa-briefcase"></span> 我的钱包</a>' +
        '<a href="../UserManage/address.html"><span class="fa fa-address-book-o"></span> 地址管理</a>' +
        '<a href="../system/systemsetting.html"><span class="fa fa-cog"></span> 基本设置</a>' +
        '<a id="sunSt" onclick="start()"><span class="fa fa-sun-o"></span>开启阳光模式</a>' +
        '<a id="sunSo" style="display: none" onclick="over()"><span class="fa fa-sun-o"></span>关闭阳光模式</a>' +
        '<a href="../courierManage/orders.html" id="courier"><span class="fa fa-user-secret"></span> 我是快递员</a>' +
        '</div>'+
    '<div class="tobe"><a href="../courierManage/identification1.html" id="tobe">我也要当快递员 <span class="fa fa-arrow-circle-right" style="color: #bfcb94"></span></a></div>';
    $("#banner").html(banner);

    var footer = '<div class="aui-bar-tab-item" tapmode id="item1" onclick="window.location.href=\'../helpBuy/index.html\'">\
        <i class="fa fa-handshake-o fa-lg"></i>\
        <div class="aui-bar-tab-label" style="font-size:11px">我来帮</div>\
        </div>\
        <div class="aui-bar-tab-item" tapmode id="item2" onclick="window.location.href=\'../helpMe/index.html\'">\
    <i class="fa fa-hand-peace-o fa-lg"></i>\
        <div class="aui-bar-tab-label" style="font-size:11px">帮我买</div>\
        </div>\
        <div class="aui-bar-tab-item" tapmode id="item3" onclick="window.location.href=\'../find/friendCircle.html\'">\
    <div class="aui-badge"></div>\
        <i class="fa fa-heartbeat fa-lg" ></i>\
        <div class="aui-bar-tab-label" style="font-size:11px">发现</div>\
        </div>'
    $("#footer").html(footer);

    var footer1 = '<div class="aui-bar-tab-item" tapmode id="item4" onclick="window.location.href=\'../courierManage/orders.html\'">\
        <i class="fa fa-magic"></i>\
        <div class="aui-bar-tab-label">附近请求</div>\
        </div>\
        <div class="aui-bar-tab-item" tapmode id="item5" onclick="window.location.href=\'../courierManage/orderList.html\'">\
    <i class="fa fa-list-alt"></i>\
        <div class="aui-bar-tab-label">我的接单</div>\
        </div>'
    $("#footer-c").html(footer1);
}

function alertmd(str){
    var model='<div class="mask"><div class="alert"><p id="words">'+str+'</p></div></div>';
    $('body').append(model);
    $(".mask").show().delay(2000).hide(300,function(){
        $(".mask").remove();
    });
}

function start(){
    var model='<div class="z_mask" id="sunS"><div class="z_alert">' +
        '<div style="height: 80px;line-height: 25px;padding:20px 0 0 0;text-align: center">确定要发布实时位置给所有用户吗？<br/>所有用户可以向你发布指定请求哦？</div> ' +
        '<div style="text-align: center;height: 39px;margin-top: 10px;width: 100%">' +
        '<div id="sureSs" onclick="sureSs()" style="width: 50%;display: inline-block;line-height: 39px;background: #25a195;border-top: 1px solid #ccc;color: #fff">确认</div>' +
        '<div id="canSs" onclick="canSs()"style="width: 50%;display: inline-block;line-height: 39px;border-top: 1px solid #ccc">取消</div></div></div></div>';
    $('body').append(model);
    $("#sunS").show();
    $("#banner").css("display","none");
    $("#left").css("display","none");

}
function over(){
    $("#sunSt").show();
    $("#sunSo").hide();
}

function sureSs(){
    $("#sunS").hide();
    $("#sunSt").hide();
    $("#sunSo").show();
}
function canSs(){
    $("#sunS").hide();
}